﻿<!--
<copyright company="Christoph van der Fecht - VDsoft">
Copyright (C) Christoph van der Fecht - VDsoft - All Rights Reserved
Unauthorized copying of this file, via any medium is strictly prohibited,
unless it is communicated and authorized by the copyright owner.
</copyright>
-->
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

	<!--Collections-->
	
	<!--ListBox-->
	
	<!--On Item click style-->
	<!--Consume the item by casting into ListBoxItem and get the Content property.-->
		<Style TargetType="ListBoxItem" x:Key="ListBoxItemClickStyle">
			<!--<EventSetter Event="PreviewMouseLeftButtonDown" Handler="OnListViewItemClick"/>-->
		</Style>
	<!--END On Item click style-->
	
	<!--END ListBox-->
<!--///////////////////////////////////////////////////////-->
	<!--ListView-->

	<!--On Item click style-->
	<!--Consume the item by casting into ListViewItem and get the Content property.-->
	<Style TargetType="ListViewItem" x:Key="ListViewItemClickStyle">
		<!--<EventSetter Event="PreviewMouseLeftButtonDown" Handler="OnListViewItemClick"/>-->
	</Style>
	<!--END On Item click style-->

	<!--END ListView-->


	<!--END Collections-->
	
	<!--Progress bar Style-->
	<!--Brushes-->
	<LinearGradientBrush x:Key="ProgressBarBackground" EndPoint="1,0" StartPoint="0,0">
		<GradientStop Color="#BABABA" Offset="0"/>
		<GradientStop Color="#C7C7C7" Offset="0.5"/>
		<GradientStop Color="#BABABA" Offset="1"/>
	</LinearGradientBrush>
	<LinearGradientBrush x:Key="ProgressBarBorderBrush" EndPoint="0,1" StartPoint="0,0">
		<GradientStop Color="#B2B2B2" Offset="0"/>
		<GradientStop Color="#8C8C8C" Offset="1"/>
	</LinearGradientBrush>
	<LinearGradientBrush x:Key="ProgressBarGlassyHighlight" EndPoint="0,1" StartPoint="0,0">
		<GradientStop Color="#50FFFFFF" Offset="0.5385"/>
		<GradientStop Color="#00FFFFFF" Offset="0.5385"/>
	</LinearGradientBrush>
	<LinearGradientBrush x:Key="ProgressBarTopHighlight" EndPoint="0,1" StartPoint="0,0">
		<GradientStop Color="#80FFFFFF" Offset="0.05"/>
		<GradientStop Color="#00FFFFFF" Offset="0.25"/>
	</LinearGradientBrush>
	<LinearGradientBrush x:Key="ProgressBarIndicatorAnimatedFill" EndPoint="1,0" StartPoint="0,0">
		<GradientStop Color="#00FFFFFF" Offset="0"/>
		<GradientStop Color="#60FFFFFF" Offset="0.4"/>
		<GradientStop Color="#60FFFFFF" Offset="0.6"/>
		<GradientStop Color="#00FFFFFF" Offset="1"/>
	</LinearGradientBrush>
	<LinearGradientBrush x:Key="ProgressBarIndicatorDarkEdgeLeft" EndPoint="1,0" StartPoint="0,0">
		<GradientStop Color="#0C000000" Offset="0"/>
		<GradientStop Color="#20000000" Offset="0.3"/>
		<GradientStop Color="#00000000" Offset="1"/>
	</LinearGradientBrush>
	<LinearGradientBrush x:Key="ProgressBarIndicatorDarkEdgeRight" EndPoint="1,0" StartPoint="0,0">
		<GradientStop Color="#00000000" Offset="0"/>
		<GradientStop Color="#20000000" Offset="0.7"/>
		<GradientStop Color="#0C000000" Offset="1"/>
	</LinearGradientBrush>
	<RadialGradientBrush x:Key="ProgressBarIndicatorLightingEffectLeft" RadiusY="1" RadiusX="1" RelativeTransform="1,0,0,1,0.5,0.5">
		<GradientStop Color="#60FFFFC4" Offset="0"/>
		<GradientStop Color="#00FFFFC4" Offset="1"/>
	</RadialGradientBrush>
	<LinearGradientBrush x:Key="ProgressBarIndicatorLightingEffect" EndPoint="0,0" StartPoint="0,1">
		<GradientStop Color="#60FFFFC4" Offset="0"/>
		<GradientStop Color="#00FFFFC4" Offset="1"/>
	</LinearGradientBrush>
	<RadialGradientBrush x:Key="ProgressBarIndicatorLightingEffectRight" RadiusY="1" RadiusX="1" RelativeTransform="1,0,0,1,-0.5,0.5">
		<GradientStop Color="#60FFFFC4" Offset="0"/>
		<GradientStop Color="#00FFFFC4" Offset="1"/>
	</RadialGradientBrush>
	<LinearGradientBrush x:Key="ProgressBarIndicatorGlassyHighlight" EndPoint="0,1" StartPoint="0,0">
		<GradientStop Color="#90FFFFFF" Offset="0.5385"/>
		<GradientStop Color="#00FFFFFF" Offset="0.5385"/>
	</LinearGradientBrush>
	<!--Style-->
	<Style x:Key="ProgressBarStyle"
               TargetType="ProgressBar">
		<Setter Property="Foreground" Value="#01D328"/>
		<Setter Property="Background" Value="{StaticResource ProgressBarBackground}"/>
		<Setter Property="BorderBrush" Value="{StaticResource ProgressBarBorderBrush}"/>
		<Setter Property="BorderThickness" Value="1"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type ProgressBar}">
					<Grid x:Name="TemplateRoot" 
						  SnapsToDevicePixels="true">
						<TextBlock Text="{TemplateBinding Tag}" 
								   Grid.ZIndex="2"
								   Foreground="#00325f"
								   HorizontalAlignment="Center"
								   VerticalAlignment="Center"/>
						<TextBlock Text="{TemplateBinding Tag}"
								   Grid.ZIndex="3" 
								   Foreground="#494b54"
								   Width="{Binding ElementName=rectangle, Path=ActualWidth}"
								   TextAlignment="Center"
								   HorizontalAlignment="Center"
								   VerticalAlignment="Center">
							<TextBlock.Clip>
								<RectangleGeometry>
									<RectangleGeometry.Rect>
										<MultiBinding Converter="{StaticResource ResourceKey=RectConverter}">
											<Binding ElementName="Indicator" Path="ActualWidth"/>
											<Binding ElementName="Indicator" Path="ActualHeight"/>
										</MultiBinding>
									</RectangleGeometry.Rect>
								</RectangleGeometry>
							</TextBlock.Clip>
						</TextBlock>
						<Rectangle x:Name="rectangle" 
								   Fill="{TemplateBinding Background}" 
								   RadiusY="2" 
								   RadiusX="2"/>
						<Border Background="{StaticResource ProgressBarGlassyHighlight}" 
								CornerRadius="2" 
								Margin="1"/>
						<Border BorderBrush="#80FFFFFF" 
								BorderThickness="1,0,1,1" 
								Background="{StaticResource ProgressBarTopHighlight}" 
								Margin="1"/>
						<Rectangle x:Name="PART_Track" 
								   Margin="1"/>
						<Decorator x:Name="PART_Indicator" 
								   HorizontalAlignment="Left" 
								   Margin="1">
							<Grid x:Name="Foreground">
								<Rectangle x:Name="Indicator" 
										   Fill="{TemplateBinding Foreground}"/>
								<Grid x:Name="Animation" 
									  ClipToBounds="true">
									<Rectangle x:Name="PART_GlowRect" 
											   Fill="{StaticResource ProgressBarIndicatorAnimatedFill}" 
											   HorizontalAlignment="Left" 
											   Margin="-100,0,0,0" 
											   Width="100"/>
								</Grid>
								<Grid x:Name="Overlay">
									<Grid.ColumnDefinitions>
										<ColumnDefinition MaxWidth="15"/>
										<ColumnDefinition Width="0.1*"/>
										<ColumnDefinition MaxWidth="15"/>
									</Grid.ColumnDefinitions>
									<Grid.RowDefinitions>
										<RowDefinition/>
										<RowDefinition/>
									</Grid.RowDefinitions>
									<Rectangle x:Name="LeftDark" 
											   Fill="{StaticResource ProgressBarIndicatorDarkEdgeLeft}" 
											   Margin="1,1,0,1" 
											   RadiusY="1" 
											   RadiusX="1" 
											   Grid.RowSpan="2"/>
									<Rectangle x:Name="RightDark" 
											   Grid.Column="2" 
											   Fill="{StaticResource ProgressBarIndicatorDarkEdgeRight}" 
											   Margin="0,1,1,1" 
											   RadiusY="1" 
											   RadiusX="1" 
											   Grid.RowSpan="2"/>
									<Rectangle x:Name="LeftLight" 
											   Grid.Column="0" 
											   Fill="{StaticResource ProgressBarIndicatorLightingEffectLeft}" 
											   Grid.Row="2"/>
									<Rectangle x:Name="CenterLight" 
											   Grid.Column="1" 
											   Fill="{StaticResource ProgressBarIndicatorLightingEffect}" 
											   Grid.Row="2"/>
									<Rectangle x:Name="RightLight" 
											   Grid.Column="2"
											   Fill="{StaticResource ProgressBarIndicatorLightingEffectRight}"
											   Grid.Row="2"/>
									<Border x:Name="Highlight1" 
											Background="{StaticResource ProgressBarIndicatorGlassyHighlight}" 
											Grid.ColumnSpan="3" 
											Grid.RowSpan="2"/>
									<Border x:Name="Highlight2"
											Background="{StaticResource ProgressBarTopHighlight}" 
											Grid.ColumnSpan="3" 
											Grid.RowSpan="2"/>
								</Grid>
							</Grid>
						</Decorator>
						<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="2"/>
					</Grid>
					<ControlTemplate.Triggers>
						<Trigger Property="Orientation" Value="Vertical">
							<Setter Property="LayoutTransform" TargetName="TemplateRoot">
								<Setter.Value>
									<RotateTransform Angle="-90"/>
								</Setter.Value>
							</Setter>
						</Trigger>
						<Trigger Property="IsIndeterminate" Value="true">
							<Setter Property="Visibility" TargetName="LeftDark" Value="Collapsed"/>
							<Setter Property="Visibility" TargetName="RightDark" Value="Collapsed"/>
							<Setter Property="Visibility" TargetName="LeftLight" Value="Collapsed"/>
							<Setter Property="Visibility" TargetName="CenterLight" Value="Collapsed"/>
							<Setter Property="Visibility" TargetName="RightLight" Value="Collapsed"/>
							<Setter Property="Visibility" TargetName="Indicator" Value="Collapsed"/>
						</Trigger>
						<Trigger Property="IsIndeterminate" Value="false">
							<Setter Property="Background" TargetName="Animation" Value="#80B5FFA9"/>
						</Trigger>
						<Trigger Property="Value" Value="100">
							<Setter Property="Visibility" TargetName="Animation" Value="Collapsed"/>
						</Trigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	<!--END Progress bar Style-->

	<!--Check box-->
	<Style x:Key="DrawnCheckBox" TargetType="{x:Type CheckBox}">
		<Setter Property="SnapsToDevicePixels" Value="true"/>
		<Setter Property="FocusVisualStyle" Value="{DynamicResource CheckBoxFocusVisual}"/>
		<Setter Property="Background" Value="{DynamicResource NormalBrush}"/>
		<Setter Property="BorderBrush" Value="{DynamicResource NormalBorderBrush}"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type CheckBox}">
						<StackPanel Orientation="Horizontal">
											<Path Name="path"
												  Opacity="0.1" 
												  Data="M 0 6 L 3 10 10 0" 
												  Stroke="#00325f" 
												  StrokeThickness="1.5" 
												  StrokeStartLineCap="Triangle" 
												  StrokeEndLineCap="Triangle"
												  StrokeLineJoin="Miter" />
							<ContentPresenter Content="{TemplateBinding Content}"/>
						</StackPanel>
					<ControlTemplate.Triggers>
						<Trigger Property="IsChecked" Value="True">
							<Setter TargetName="path" Property="Opacity" Value="1.0" />
							<Setter TargetName="path" Property="Stroke" Value="#00325f" />
							<Setter TargetName="path" Property="StrokeThickness" Value="2.5" />
						</Trigger>
						<Trigger Property="IsChecked" Value="False">
							<Setter TargetName="path" Property="Opacity" Value="0.2" />
							<Setter TargetName="path" Property="Stroke" Value="#494b54" />
							<Setter TargetName="path" Property="StrokeThickness" Value="2.5" />
						</Trigger>
						<Trigger Property="IsEnabled" Value="False">
							<Setter Property="Foreground" Value="LightGray"/>
							<Setter TargetName="path" Property="Opacity" Value="0.5" />
							<Setter TargetName="path" Property="Stroke" Value="#494b54" />
						</Trigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	<!--END Check box-->
	
	<!--Watermark Textbox-->
	<Style x:Key="WatermarkTextbox" TargetType="TextBox">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="TextBox">
					<Grid>
						<Border Background="White"
								BorderBrush="#FF7D8683"
								BorderThickness="1"/>
						<ScrollViewer x:Name="PartContentHost"
									  Margin="5,0,0,0"
									  VerticalAlignment="Center"/>
						<Label x:Name="WaterMarkLabel"
							   Margin="5,0,0,0"
							   Content="{TemplateBinding Tag}"
							   VerticalAlignment="Center"
							   Visibility="Collapsed"
							   Foreground="#494b54"
							   FontFamily="{TemplateBinding FontFamily}"/>
					</Grid>
					<ControlTemplate.Triggers>
						<MultiTrigger>
							<MultiTrigger.Conditions>
								<Condition Property="Text" Value=""/>
							</MultiTrigger.Conditions>
							<Setter Property="Visibility" TargetName="WaterMarkLabel" Value="Visible"/>
						</MultiTrigger>
						<Trigger Property="IsEnabled" Value="False">
							<Setter Property="Foreground" Value="DimGray"/>
						</Trigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	<!--END Watermark Textbox-->
	
</ResourceDictionary>